module.exports = {
  lintOnSave:false,
  css: {
    loaderOptions: {
      scss: {
        /* 自动引入全局scss文件 */
        additionalData: (content, loaderContext) => {
          const { resourcePath } = loaderContext;
          if (resourcePath.endsWith("var.scss")) return content;
          return `@import "./src/styles/var.scss"; ${content}`;
        },
        sassOptions: { outputStyle: "expanded" }, // fix: 解决 element-ui 图标 icon 偶现乱码问题
      },
      less: {
        modifyVars: {
          // less vars，customize ant design theme
          // 'primary-color': '#F5222D',
          // 'link-color': '#F5222D',
          'border-radius-base': '2px'
        },
        // DO NOT REMOVE THIS LINE
        javascriptEnabled: true
      }
    },
  },
}